<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML>
<html>
<head>
<title>主页</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords"
	content="Novus Admin Panel Responsive web template, Bootstrap Web Templates, Flat Web Templates, Android Compatible web template, 
SmartPhone Compatible web template, free WebDesigns for Nokia, Samsung, LG, SonyEricsson, Motorola web design" />
<script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script>
<!-- Bootstrap Core CSS -->
<link href="/EMS/css/bootstrap.css" rel='stylesheet' type='text/css' />
<!-- Custom CSS -->
<link href="/EMS/css/style.css" rel='stylesheet' type='text/css' />
<!-- font CSS -->
<!-- font-awesome icons -->
<link href="/EMS/css/font-awesome.css" rel="stylesheet">
<!-- //font-awesome icons -->
<!-- js-->
<script src="/EMS/js/jquery-1.11.1.min.js"></script>
<script src="/EMS/js/modernizr.custom.js"></script>
<!--webfonts-->
<link
	href='http://fonts.useso.com/css?family=Roboto+Condensed:400,300,300italic,400italic,700,700italic'
	rel='stylesheet' type='text/css'>
<!--//webfonts-->
<!--animate-->
<link href="/EMS/css/animate.css" rel="stylesheet" type="text/css"
	media="all">
<script src="/EMS/js/wow.min.js"></script>
<script>
		 new WOW().init();
	</script>
<!--//end-animate-->
<!-- chart -->
<script src="/EMS/js/Chart.js"></script>
<!-- //chart -->
<!--Calender-->
<link rel="stylesheet" href="/EMS/css/clndr.css" type="text/css" />
<script src="/EMS/js/underscore-min.js" type="text/javascript"></script>
<script src="/EMS/js/moment-2.2.1.js" type="text/javascript"></script>
<script src="/EMS/js/clndr.js" type="text/javascript"></script>
<script src="/EMS/js/site.js" type="text/javascript"></script>
<!--End Calender-->
<!-- Metis Menu -->
<script src="/EMS/js/metisMenu.min.js"></script>
<script src="/EMS/js/custom.js"></script>
<link href="/EMS/css/custom.css" rel="stylesheet">
<!--//Metis Menu -->
</head>
<body class="cbp-spmenu-push">
	<div class="main-content">

		<%@include file="/header.jsp"%>
		<%@include file="/user/userSidebar.jsp"%>

		<!-- main content start-->
		<div id="page-wrapper">
		<!-- Table -->
          <div class="row">

            
	              <div class="widget-head">
	                <div class="pull-left">最新公告</div>
	                
	                  <a href="/EMS/user/ShowPublicMessagesListServlet">更多...</a> 
	                  <a href="#" class="wminimize"><i class="icon-chevron-up"></i></a> 
	                  <a href="#" class="wclose"><i class="icon-remove"></i></a>
	                </div>  
	                <div class="clearfix"></div>
	              </div>

                <div class="col-md-8 stats-info stats-last widget-shadow">
                    <table class="table stats-table">
                    <thead>
                      <tr>
                        <th>#</th>
                        <th>标题</th>
                        <th>发布时间</th>
                        <th>发布人</th>
                      </tr>
                    </thead>
                    <tbody>
                    <c:forEach items="${requestScope.messages1}" var="publicMessage">
                      <tr>
                        <td>${publicMessage.messageId}</td>
                        <td><a href="/EMS/user/ShowMessageServlet?MessageId=${publicMessage.messageId}">${publicMessage.title}</a></td>
                        <td>${publicMessage.publishDateTime}</td>
                        <td>${publicMessage.publisher.loginName}</td>
                      </tr>
                    </c:forEach>
                    </tbody>
                  </table>
                </div>


            <div class="col-md-6">
        
	              <div class="widget-head">
	                <div class="pull-left">最新部门消息</div>
	             
	                  <a href="/EMS/user/ShowDepartmentMessagesListServlet">更多...</a> 
	                  <a href="#" class="wminimize"><i class="icon-chevron-up"></i></a> 
	                  <a href="#" class="wclose"><i class="icon-remove"></i></a>
	                </div>  
	                <div class="clearfix"></div>
	              </div>

                <div class="col-md-8 stats-info stats-last widget-shadow">
                    <table class="table stats-table">
                    <thead>
                      <tr>
                        <th>#</th>
                        <th>标题</th>
                        <th>发布时间</th>
                        <th>发布人</th>
                      </tr>
                    </thead>
                    <tbody>
                    <c:forEach items="${requestScope.messages2}" var="departmentMessage">
                      <tr>
                        <td>${departmentMessage.messageId}</td>
                        <td><a href="/EMS/user/ShowMessageServlet?MessageId=${departmentMessage.messageId}">${departmentMessage.title}</a></td>
                        <td>${departmentMessage.publishDateTime}</td>
                        <td>${departmentMessage.publisher.loginName}</td>
                      </tr>
                    </c:forEach>
                    </tbody>
                  </table>
                </div>  
          
            <div class="col-md-6">

	              <div class="widget-head">
	                <div class="pull-left">接收的个人消息</div>
	                
	                  <a href="/EMS/user/ShowNotesListServlet">更多...</a> 
	                  <a href="#" class="wminimize"><i class="icon-chevron-up"></i></a> 
	                  <a href="#" class="wclose"><i class="icon-remove"></i></a>
	                </div>  
	                <div class="clearfix"></div>
	              </div>

               <div class="col-md-8 stats-info stats-last widget-shadow">
                    <table class="table stats-table">
                    <thead>
                      <tr>
                        <th>#</th>
                        <th>状态</th>
                        <th>标题</th>
                        <th>发送时间</th>
                        <th>发送人</th>
                      </tr>
                    </thead>
                    <tbody>
                    <c:forEach items="${requestScope.notes1}" var="note1">
                      <tr>
                        <td>${note1.noteId}</td>
                        <td>
                          <c:if test="${not note1.read}"><span class="label label-danger" style="cursor: pointer;" onclick="setRead('true', ${note1.noteId})">未读</span></c:if>
                          <c:if test="${note1.read}"><span class="label label-success" style="cursor: pointer;" onclick="setRead('false', ${note1.noteId})">已读</span></c:if>
                        </td>
                        <td><a href="/EMS/user/ShowNoteServlet?NoteId=${note1.noteId}">${note1.title}</a></td>
                        <td>${note1.sendDateTime}</td>
                        <td>${note1.sender.loginName}</td>
                      </tr>
                    </c:forEach>
                    </tbody>
                  </table>
                </div>
           
         

            <div class="col-md-6">
           
                <div class="widget-head">
                  <div class="pull-left">发送的个人消息</div>
                 
                    <a href="/EMS/user/ShowNotesListServlet">更多...</a> 
                    <a href="#" class="wminimize"><i class="icon-chevron-up"></i></a> 
                    <a href="#" class="wclose"><i class="icon-remove"></i></a>
                  </div>  
                  <div class="clearfix"></div>
                </div>

               <div class="col-md-8 stats-info stats-last widget-shadow">
                    <table class="table stats-table">
                    <thead>
                      <tr>
                        <th>#</th>
                        <th>状态</th>
                        <th>标题</th>
                        <th>发送时间</th>
                        <th>接收人</th>
                      </tr>
                    </thead>
                    <tbody>
                    <c:forEach items="${requestScope.notes2}" var="note2">
                      <tr>
                        <td>${note2.noteId}</td>
                        <td>
                          <c:if test="${not note2.read}"><span class="label label-danger">未读</span></c:if>
                          <c:if test="${note2.read}"><span class="label label-success">已读</span></c:if>
                        </td>
                        <td><a href="/EMS/user/ShowNoteServlet?NoteId=${note2.noteId}">${note2.title}</a></td>
                        <td>${note2.sendDateTime}</td>
                        <td>${note2.sendee.loginName}</td>
                      </tr>
                    </c:forEach>
                    </tbody>
                  </table>
                </div>
               </div>
               </div>
            
     
	<!--footer-->
	<%@include file="/footer.jsp"%>

	<!--//footer-->
	<!-- Classie -->
	<script src="/EMS/js/classie.js"></script>
	<script>
			var menuLeft = document.getElementById( 'cbp-spmenu-s1' ),
				showLeftPush = document.getElementById( 'showLeftPush' ),
				body = document.body;
				
			showLeftPush.onclick = function() {
				classie.toggle( this, 'active' );
				classie.toggle( body, 'cbp-spmenu-push-toright' );
				classie.toggle( menuLeft, 'cbp-spmenu-open' );
				disableOther( 'showLeftPush' );
			};
			

			function disableOther( button ) {
				if( button !== 'showLeftPush' ) {
					classie.toggle( showLeftPush, 'disabled' );
				}
			}
		</script>
	<!--scrolling js-->
	<script src="/EMS/js/jquery.nicescroll.js"></script>
	<script src="/EMS/js/scripts.js"></script>
	<!--//scrolling js-->
	<!-- Bootstrap Core JavaScript -->
	<script src="/EMS/js/bootstrap.js"> </script>
</body>
</html>